﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using SFP;
using SFP.Input;
using HamsterDelivery.Menus.Options;

namespace HamsterDelivery.Menus
{
    public class PauseMenu : Menu
    {
        public PauseMenu(HamsterGame game)
        {
            Option resume = new ResumeOption(game, this, 250, 210);
            Option saveGame = new SaveGameOption(game, this, 263, 280);
            Option loadGame = new LoadGameOption(game, this, 300, 350);
            Option options = new OptionsOption(game, this, 269, 425);
            Option startMenu = new StartMenuOption(game, this, 246, 500);

            resume.UpOption = startMenu;
            resume.DownOption = saveGame;

            saveGame.UpOption = resume;
            saveGame.DownOption = loadGame;

            loadGame.UpOption = saveGame;
            loadGame.DownOption = options;

            options.UpOption = loadGame;
            options.DownOption = startMenu;

            startMenu.UpOption = options;
            startMenu.DownOption = resume;

            DefaultOption = resume;
        }

        public override void update(KeyboardState keyStates)
        {
            ActiveOption.update(keyStates);
        }

        public override void draw(Graphics g)
        {
            g.DrawImage(Resources.B_PAUSE_MENU, new Point(0, 0));
            ActiveOption.draw(g);
        }
    }
}
